package data.content.visitor;

import client.gui.roombox.RoomBoxModel;
import data.content.ContentSentence;
import data.content.ContentStalkerJoin;
import data.content.ContentStalkerLeaves;

public class UpdateRoomBoxModelContentVisitor extends ContentVisitor<Void> {

  
  private final RoomBoxModel model_;
  
  public UpdateRoomBoxModelContentVisitor(RoomBoxModel model) {
    assert (model != null);
    model_ = model;
  }
  
  @Override
  public Void visit(ContentSentence sentence) {
    return null;
  }

  @Override
  public Void visit(ContentStalkerJoin stalkerJoin) {
    model_.assignStalkerToRoom(stalkerJoin.getStalker());
    return null;
  }

  @Override
  public Void visit(ContentStalkerLeaves stalkerLeave) {
    model_.removeStalkerFromRoom(stalkerLeave.getStalker());
    return null;
  }
  
}
